package me.liangdi.spring.todo.bean;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * todos list
 * Created by liangdi on 1/5/16.
 */
@Document
public class TodoList {
    @Id
    private String id;
    /**
     * TodoList的标题
     */
    private String title;
    /**
     * 标记的颜色
     */
    private String color;
    /**
     * 排序
     */
    private int order;
    /**
     * 删除标记
     */
    @Indexed private boolean deleted;

    public TodoList(String title) {
        this.title = title;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public String toString() {
        return "TodoList{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", color='" + color + '\'' +
                ", order=" + order +
                ", deleted=" + deleted +
                '}';
    }
}
